﻿<%@ Page Language="c#" CodeBehind="Login.aspx.cs" AutoEventWireup="True" Inherits="MM.Web.Login" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title>2.0登录页</title>
    <link href="CSS/login.css" type="text/css" rel="stylesheet">
</head>
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
    <form id="Form1" method="post" runat="server">
    <br>
    <br>
    <br>
    <br>
    <br>
    <table width="620" border="0" align="center" cellpadding="0" cellspacing="0">
        <tbody>
            <tr>
                <td width="620">
                    <img height="11" src="Images/login_p_img02.gif" width="650" />
                </td>
            </tr>
            <tr>
                <td align="center" background="Images/login_p_img03.gif" />
                <br>
                <table width="570" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td>
                            <table cellspacing="0" cellpadding="0" width="570" border="0">
                                <tbody>
                                    <tr>
                                        <td width="245" height="80" align="center" valign="top">
                                            &nbsp;
                                        </td>
                                        <td align="right" valign="top">
                                            <br>
                                            &nbsp;
                                            <img height="9" src="Images/point07.gif" width="13" border="0" /><a href="#" onclick="AddSC()">2.0管理系统
                                                加入收藏</a>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="display: none;">
                            &nbsp;<asp:Label ID="lblGUID" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <img src="images/a_te01.gif" width="570" height="3">
                        </td>
                    </tr>
                    <tr>
                        <td align="center" background="images/a_te02.gif">
                            <table width="520" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="123" height="120">
                                        <img height="95" src="Images/login_p_img05.gif" width="123" border="0">
                                    </td>
                                    <td align="center">
                                        <table cellspacing="0" cellpadding="0" border="0">
                                            <tr>
                                                <td width="210" height="25" valign="top">
                                                    用户名：
                                                    <input class="nemo01" tabindex="1" maxlength="22" size="22" name="user" id="txtUsername"
                                                        runat="server">
                                                </td>
                                                <td width="80" rowspan="3" align="right" valign="middle">
                                                    <asp:ImageButton ID="btnLogin" runat="server" ImageUrl="Images/login_p_img11.gif"
                                                        OnClientClick="return CheckLogin();"></asp:ImageButton>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="bottom" height="12">
                                                    密&nbsp;&nbsp;&nbsp;码：
                                                    <input name="user" type="password" class="nemo01" tabindex="1" size="22" maxlength="22"
                                                        id="txtPass" runat="server">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="bottom" height="13">
                                                    <table width="100%%" height="25" border="0" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td width="70%" align="left">
                                                                验证码：
                                                                <input class="nemo01" id="CheckCode" tabindex="3" maxlength="22" size="11" name="user"
                                                                    runat="server">
                                                            </td>
                                                            <td width="30%" align="left">
                                                                <a id="A2" href="" onclick="ChangeCode();return false;">
                                                                    <asp:Image ID="ImageCheck" runat="server" ImageUrl="ValidateCode.aspx?GUID=GUID"
                                                                        ImageAlign="AbsMiddle" ToolTip="看不清楚，换一个"></asp:Image></a>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                        <br>
                                        <asp:Label ID="lblMsg" runat="server" BackColor="Transparent" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="#d5d5d5">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td height="70" align="center">
                                        2.0管理系统 Copyright(C) 2011~2012 Tigers All Rights Reserved.
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                </td>
            </tr>
            <tr>
                <td>
                    <img height="11" src="Images/login_p_img04.gif" width="650">
                </td>
            </tr>
        </tbody>
    </table>
    <br>
    </form>

    <script language="javascript" type="text/javascript">
        String.prototype.Trim = function() {
            return this.replace(/(^\s*)|(\s*$)/g, "");
        }
        function ChangeCode() {

            var date = new Date();
            var myImg = document.getElementById("ImageCheck");
            var GUID = document.getElementById("lblGUID");

            if (GUID != null) {
                if (GUID.innerHTML != "" && GUID.innerHTML != null) {
                    myImg.src = "ValidateCode.aspx?GUID=" + GUID.innerHTML + "&flag=" + date.getMilliseconds()
                }
            }
            return false;
        }

        function CheckLogin() {
            var strUserName = document.getElementById("txtUsername").value.Trim();
            if (strUserName == "") {
                document.getElementById("lblMsg").innerHTML = "用户名不能为空！";
                return false;
            }
            var strPassWord = document.getElementById("txtPass").value.Trim();
            if (strPassWord == "") {
                document.getElementById("lblMsg").innerHTML = "密码不能为空！";
                return false;
            }
            var strCheck = document.getElementById("CheckCode").value.Trim();
            if (strPassWord == "") {
                document.getElementById("lblMsg").innerHTML = "验证码不能为空！";
                return false;
            }
            return true;
        }
        function AddSC() {
            var strURL = window.location.href;
            window.external.addFavorite(strURL, '2.0管理系统');
        }
    </script>

</body>
</html>
